﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>云科技</title>
        <link type="text/css" rel="stylesheet" media="all" href="../styles/global.css" />
        <link type="text/css" rel="stylesheet" media="all" href="../styles/global_color.css" />
    </head>
    <body>
        <!--Logo区域开始-->
        <div id="header">
            <img src="../images/logo.png" alt="logo" class="left" />
            <a href="/logout">[退出]</a>
        </div>
        <!--Logo区域结束-->
        <!--导航区域开始-->
        <div id="navi">
            <ul id="menu">
                <li><a href="/index" class="index_on"></a></li>
                <li><a href="/rolelist" class="role_off"></a></li>
                <li><a href="/adminList" class="admin_off"></a></li>
                <li><a href="/feelist" class="fee_off"></a></li>
                <li><a href="/accountlist" class="account_off"></a></li>
                <li><a href="/servicelist" class="service_off"></a></li>
                <li><a href="/billList" class="bill_off"></a></li>
                <li><a href="/reportList" class="report_off"></a></li>
                <li><a href="/userInfo" class="information_off"></a></li>
                <li><a href="/userModiPwd" class="password_off"></a></li>
            </ul>
        </div>
        <!--导航区域结束-->
        <!--主要区域开始-->
        <div id="main">            
            <form action="" method="" class="main_form">
                <!--必填项-->
                <div class="text_info clearfix"><span>账务账号ID：</span></div>
                <div class="input_info"><input type="text" readonly class="readonly" id="accountId"/></div>
                <div class="text_info clearfix"><span>姓名：</span></div>
                <div class="input_info"><input type="text" readonly class="readonly" id="realName"/></div>
                <div class="text_info clearfix"><span>身份证：</span></div>
                <div class="input_info">
                    <input type="text" readonly class="readonly" id="idcard"/>
                </div>
                <div class="text_info clearfix"><span>登录账号：</span></div>
                <div class="input_info">
                    <input type="text" readonly class="readonly" id="loginName"/>
                </div>                   
                <div class="text_info clearfix"><span>电话：</span></div>
                <div class="input_info">
                    <input type="text" class="width200 readonly" readonly id="telephone"/>
                </div>
                <div class="text_info clearfix"><span>状态：</span></div>
                <div class="input_info">
                    <input type="text" class="width200 readonly" readonly id="statu"/>
                </div>                    
                <div class="text_info clearfix"><span>开通/暂停/删除时间：</span></div>
                <div class="input_info"><input type="text" readonly class="readonly" id="timeDate"/></div>

                <div class="text_info clearfix"><span>上次登录时间：</span></div>
                <div class="input_info"><input type="text" readonly class="readonly" id="lastLoginDate"/></div>
                <div class="text_info clearfix"><span>上次登录IP：</span></div>
                <div class="input_info"><input type="text" readonly class="readonly" id="lastLoginIp"/></div>
                <!--可选项数据-->
                <div class="text_info clearfix"><span>生日：</span></div>
                <div class="input_info">
                    <input type="text" readonly class="readonly" id="birthdate"/>
                </div>
                <div class="text_info clearfix"><span>Email：</span></div>
                <div class="input_info">
                    <input type="text" class="width350 readonly" readonly id="email"/>
                </div> 
                <div class="text_info clearfix"><span>职业：</span></div>
                <div class="input_info">
                    <input type="text" class="width350 readonly" readonly id="occupation"/>
                </div>
                <div class="text_info clearfix"><span>性别：</span></div>
                <div class="input_info fee_type">
                    <input type="radio" name="radSex" id="female" value="1" onclick="feeTypeChange('1');" disabled />
                    <label for="female">女</label>
                    <input type="radio" name="radSex" id="male" value="0" onclick="feeTypeChange('0');" disabled />
                    <label for="male">男</label>
                </div>
                <div class="text_info clearfix"><span>邮编：</span></div>
                <div class="input_info"><input type="text" class="readonly" readonly id="zipcode"/></div>
                <div class="text_info clearfix"><span>QQ：</span></div>
                <div class="input_info"><input type="text" class="readonly" readonly id="qq"/></div>
                <!--操作按钮-->
                <div class="button_info clearfix">
                    <input type="button" value="返回" class="btn_save" onclick="location.href='/accountlist';" />
                </div>
            </form>  
        </div>
        <!--主要区域结束-->
        <div id="footer">
            <span>[源自北美的技术，最优秀的师资，最真实的企业环境，最适用的实战项目]</span>
            <br />
            <span>版权所有(C)云科技有限公司 </span>
        </div>
        <script src="../../js/jquery-3.2.1.js"></script>
        <script src="../../js/GetQueryString.js"></script>
        <script src="../../js/parseDate.js"></script>
        <script>
            var accountId=GetQueryString('accountId');
            function feeTypeChange(gender){
                if(gender=='0'){
                    $("#male").prop('checked', 'checked');
                }else if(gender=='1'){
                    $("#female").prop('checked', 'checked');
                }
            }
            $.ajax({
                url:"/findAccountById",
                type:"post",
                data:{
                    accountId:accountId
                },
                success:function (data) {
                    for (var i in data){
                        var account=data[i];
                        var realName=account.realName;
                        var idcardNo=account.idcardNo;
                        var loginName=account.loginName;
                        var telephone=account.telephone;
                        var status=account.status;
                        var statu=null;
                        var createDate=account.createDate;
                        var pauseDate=account.pauseDate;
                        var closeDate=account.closeDate;
                        var createdate=getLocalTime(createDate);
                        var pausedate=getLocalTime(pauseDate);
                        var closedate=getLocalTime(closeDate);
                        var timeDate=null;
                        if (status==0){
                            statu="开通";
                            timeDate=createdate;
                        }else if (status==1){
                            statu="暂停";
                            timeDate=pausedate;
                        }else{
                            statu="删除";
                            timeDate=closedate;
                        }
                        var lastLoginTime=account.lastLoginTime;
                        var lastLoginDate=getLocalTime(lastLoginTime);
                        var lastLoginIp=account.lastLoginIp;
                        var birthdate=idcardNo.substring(6,14);
                        var email=account.email;
                        var occupation=account.occupation;
                        var gender=account.gender;
                        feeTypeChange(gender);
                        var zipcode=account.zipcode;
                        var qq=account.qq;
                        $("#accountId").val(''+accountId+'');
                        $("#realName").val(''+realName+'');
                        $("#idcard").val(''+idcardNo+'');
                        $("#loginName").val(''+loginName+'');
                        $("#telephone").val(''+telephone+'');
                        $("#statu").val(''+statu+'');
                        $("#timeDate").val(''+timeDate+'');
                        $("#lastLoginDate").val(''+lastLoginDate+'');
                        $("#lastLoginIp").val(''+lastLoginIp+'');
                        $("#birthdate").val(''+birthdate+'');
                        $("#email").val(''+email+'');
                        $("#occupation").val(''+occupation+'');
                        $("#zipcode").val(''+zipcode+'');
                        $("#qq").val(''+qq+'');
                    }
                }
            });
        </script>
    </body>
</html>
